Contents
  1. 1. Introduction
  2. 2. 发现问题
  3. 3. 解决方法

Introduction

最近总是出现测试环境出错,而本地环境没错。用chrome查看请求详情如下图1、图2:

图片1

图片2

发现问题

今天网络出奇的好,终于能够重新远程debug了。调号端口,走你。。。

点了若干次F6后,终于看到了一个异常:

1
org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.

解决方法

经查询得知:是tomcat connector的原因 ,还给出了tomcat7官方配置connector中增加maxHttpHeaderSize设置即可,如下图3。

图片3

这下就不会出问题了。

Contents
  1. 1. Introduction
  2. 2. 发现问题
  3. 3. 解决方法